paned: Protect against NULL variable
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Aug 2022 16:11:01 +0000 (13:11 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Aug 2022 16:59:09 +0000 (13:59 -0300)
commit120399cc921c6e85defc890a1dbcc5b0610d552d
tree1da695bff20b9c7d492f80c820beb75142f5a595
parent86e5ad85b7018c7bc4e692a8c1d679f7c897c96e
paned: Protect against NULL variable

The inner loop in gtk_paned_set_focus_child() tries to find the
topmost GtkPaned, however, if the `w` variable ends up becoming
NULL after bubbling up the entire GtkWidget hierarchy, this loop
never breaks.

Check for NULL in this loop.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
gtk/gtkpaned.c